<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
		<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
		<script type="text/javascript" src="js/chinese.js"></script>
		<link type="text/css" rel="stylesheet" href="style/style.css" />
		<title>无线IPPBX</title>
</head>
<body class="gui">

<div id="wrapper">
<div id="content">
	<div id="header">
<div id="logo">
<h1>Control Panel</h1>
</div>
<div id="mainMenu">
	<span><a id="nets" href="wan.htm"><img id="net" src="images/net_small.png" border="0"></a></span>
	<span><a id="cdrs" href="Dialing.htm"><img id="cdr" src="images/cdr_big.png" border="0"></a></span>
	<span><a id="manages" href="downlog.htm"><img id="manage" src="images/manage_small.png" border="0"></a></span>
</div>
<div id="menu">
 <div id="menuMain">
  <ul id="menuMainList">
  	<li><a href="Dialing.htm"><strong><script type="text/javascript">Capture(ivr_menu.basic)</script></strong></a></li>
   	<li><a href="extension.htm"><strong><script type="text/javascript">Capture(ivr_menu.extension_config)</script></strong></a></li>
   	<li><a href="trunk.htm"><strong><script type="text/javascript">Capture(ivr_menu.trunk_config)</script></strong></a></li>
   	<li class="current"><span><strong><script type="text/javascript">Capture(ivr_menu.tietrunk)</script></strong></span></a></li>
   	<li><a href="Analog_trunk.htm"><strong><script type="text/javascript">Capture(ivr_menu.system)</script></strong></a></li>
   	<li><a href="Systemcfg.htm"><strong><script type="text/javascript">Capture(ivr_menu.advanced)</script></strong></a></li>
  </ul>
 </div>
</div>
</div>
<div id="main">
<div id="contents">
<form name="filters" action="#" method="post" >
<fieldset>
<legend><script type="text/javascript">Capture(tietrunk_mode.param5 )</script></legend>
<div class="frame_tab_layer">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
<tr>
<td  class="frame_tab_right"><input type="radio" id="radio1" name="id492" value="1"/>
<label><script type="text/javascript">Capture(tietrunk_mode.param1)</script></label></td>
</tr>
<tr>
<td class="frame_tab_right"><input type="radio" id="radio2" name="id492" value="3"/>
<label><script type="text/javascript">Capture(tietrunk_mode.param3)</script></label></td>
</tr>
</table>
</div>
</fieldset>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
		<div class="submitFooter">
<script type="text/javascript">
//<![CDATA[
submitFooterButton(1,0);
//]]>
</script>
</div>
</form>
</div>
</div>
<br/>
<div id="helpContainer">
<div id="help">
<div><h2><img src="images/help_title.png" border="0"><script type="text/javascript">Capture(share.help)</script></h2></div>
<dl>
<dt class="term"><script type="text/javascript">Capture(tietrunk_mode.param1)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(tietrunk_mode.param2)</script></dd>
<dt class="term"><script type="text/javascript">Capture(tietrunk_mode.param3)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(tietrunk_mode.param4)</script></dd>
</dl>
</div>
</div>

<div id="floatKiller"></div>
<div id="statusInfo">

<div class="info"><span id="loginuser"></span></div>
<!--<div class="info"><script type="text/javascript">Capture(share.logintime)</script><span id="uptime"></span></div>-->
<div class="info"><button class="logout" onclick="reboot();"><img src="images/reboot.gif" border="0">&#160;<script type="text/javascript">Capture(tools.td10)</script></button><button class="logout" onclick="logout();"><img src="images/logout.gif" border="0">&#160;<script type="text/javascript">Capture(share.logout)</script></button></div>
</div>

</div>
</div>
<div id="lock_div">&nbsp; </div>
<div id="lock_div2">&nbsp;</div>
<div id="message_panel"><span id="mess">&nbsp;</span><br/>
  <br/>
  <img src="images/jd.gif"/>
</div><script type="text/javascript">
	setTimeout("height_div()",500);
	ivr_load();
		</script>
<script type="text/javascript" src="lib.js"></script>
<script type="text/javascript" src="js/message_panel.js"></script>
<script type="text/javascript" src="js/tietrunk.js"></script>
<script type="text/javascript">
	function submits() {
	if($("#radio1").attr("checked")) {
		var url="method=gw.config.set&id492=1&id801=&id802=&id803=&tmp="+Math.random();
		submitvalue(url,"8");
	}else if($("#radio2").attr("checked")) {
		var url="method=gw.config.set&id492=3&tmp="+Math.random();
		submitvalue(url,"9");
	}
}

function getrole() {
	var url="/xml?method=gw.config.get&id=492&tmp="+Math.random();
	$.get(url,function (data) {
		var stat=$(data).find('rsp').attr("stat");
		if(stat=="fail") {
			$(data).find('Error').each(function () {
				var code=$(this).attr('code');
				if(code==4) {
					//show_message("err",msg.cannotModify1);
					alert(msg.cannotModify1);
				}else if(code==5) {
					gotologin();
				}
			});
		}else {
			$(data).find("item").each(function () {
				var value492='';
				if($(this).attr("id")=="492") {
					value492=$(this).attr("value");
				}if(value492=="1") {
					$("#radio1").attr("checked",true);
				}else if(value492=="3") {
					$("#radio2").attr("checked",true);
				}else {
					$("#radio1").attr("checked",true);
				}
			});
		}
	});
}

	getrole();
	$("[name=submit]").click(function () {
		submits();
	});


</script>
</body>
</html>
